How to install MINIDLNA on Ubuntu

MINIDLNA is a Universal Plug and Play Media (UPnP) DLNA Streaming Server which can be used to stream locally stored video to DLNA equipped TVs and well as to other PCs.

DLNA is designed to act as a bridge between your various bits of kit, so you can watch a film from your PC on your big-screen TV, play an MP3 from your smartphone on your stereo, or send shots from the family photo album to your wireless printer via your tablet. Think of it as a kind of home cloud: it shouldn’t matter where your media is or what device you’re currently holding; with DLNA, whatever you want should come to wherever you are and whatever you’re using.

This post explains how to setup MiniDLNA server on Ubuntu for streaming content to media players over the network.

Altought there are other programs out that do a similar thing, MiniDLNA is more lightweight and provides better support for media formats.

For the security of your data, I suggest you to save all your data on a RAID to avoid losing data if a disk fails.

Downoad and Setup MINIDLNA

To install, from Terminal enter:

sudo apt-get install minidlna

Once installed you will need to edit the configuration file:

sudo nano etc/minidlna.conf

Go to the section below and under the line ‘media_dir=/var/lib/minidlna’ add the path to your media.

Edit the following to point to your media shown as shown below.

  • V stands for Video
  • A stands for Audio
  • P stands for Photos/pictures
# If you want to restrict a media_dir to a specific content type, you can 
# prepend the directory name with a letter representing the type (A, P or V), 
# followed by a comma, as so: 
# * "A" for audio (eg. media_dir=A,/var/lib/minidlna/music) 
# * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures) 
# * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos) 
# * "PV" for pictures and video (eg. media_dir=PV,/var/lib/minidlna/digital_camera) 
media_dir=/var/lib/minidlna

Now set friendly name entry for the media server:

friendly_name=MediaServer

inotify autoupdates your library but does require resouces. If you do not use inotify you will need to restart or reload the miniDLNA service to refresh the library.

Enable Automatic Discovery of new media:

# Automatic discovery of new files in the media_dir directory. 
inotify=yes

The rest of the settings can remain unchanged

Now restart MiniDLNA

sudo minidland –R

and reload the database

sudo service minidlna force-reload

If you want to display the limited web interface status for MiniDLNA, open a web browser enter the servers ip address on port 8200

e.g. 192.168.0.100:8200

You will see something similar to the screen below:

For additional help in configuring MiniDLNA see the Ubuntu Wiki.

Previous Entries Use your Raspberry Pi as UniFi Controller Next Entries Unifi Cloud Access: What is it and How it works